package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Li_DaChiZi
 * Date: 2025/7/4
 * Time: 12:26
 */
public class Demo12 {
    public static void main(String[] args) {
        try (OutputStream outputStream = new FileOutputStream("./test.txt",true)){
            byte[] buffer = new byte[] {(byte)0xe4,(byte)0xbd,(byte)0xa0,(byte)0xe5,(byte)0xa5,(byte)0xbd};
            outputStream.write(buffer);
//            outputStream.write(0xe4);
//            outputStream.write(0xbd);
//            outputStream.write(0xa0);
//            outputStream.write(0xe5);
//            outputStream.write(0xa5);
//            outputStream.write(0xbd);
        } catch (FileNotFoundException e) {
            throw new RuntimeException(e);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
